<template>
    <!-- 4. keep-live -->
    <div>
        <h1>子组件4</h1>
        <p>{{num}}</p>
        <button @click="num++">+1</button>
    </div>
</template>

<script>
export default {
    name:'',
    components: {

    },
    props: {

    },
    data() {
        return {
            num:10
        };
    },
    methods: {

    },
    watch: {

    },
    created() {
        console.log('子组件4创建啦！！')
    },
    destroyed(){
        console.log('子组件4被销毁了...')
    }
};
</script>

<style scoped lang="less">

</style>
